package DaEr4_1;

public class DiGui {
   /* public static void main(String[] args) {
        int res;
        res = age(5);
        System.out.println("第五个人的年龄：" + res);
    }
        public static int age(int n){
            int res;
            if (n==1){
                res=10;
            }else {
                res=age(n-1)+2;
            }
            return res;
        }*/
    public static void main(String[] args) {
        int res;
        res = jie(5);
        System.out.println("res = " + res);
    }
    public static int jie(int n){
        int res;
        if (n==1){
            res=1;
        }else {
            res=jie(n-1)*n;
        }
        return res;
    }
}
